package com.foftact.etfweekly;

import java.math.BigDecimal;
import java.util.Date;

/**
 * ETF周线数据模型类
 * 对应数据库表：etf_weekly
 */
public class ETFWeekly {
    private Long id;             // 主键ID
    private String code;         // 板块/ETF代码
    private Integer market;      // 市场代码
    private String name;         // 板块/ETF名称
    private Date weekDate;       // 周日期
    private BigDecimal open;     // 开盘价
    private BigDecimal close;    // 收盘价
    private BigDecimal high;     // 最高价
    private BigDecimal low;      // 最低价
    private Long volume;         // 成交量
    private BigDecimal amount;   // 成交额
    private BigDecimal changePercent;   // 涨跌幅(%)
    private BigDecimal changeAmount; // 涨跌额
    private String dataSource;   // 数据来源
    private Date createTime;     // 创建时间
    private Date updateTime;     // 更新时间

    // getter和setter方法
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getMarket() {
        return market;
    }

    public void setMarket(Integer market) {
        this.market = market;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getWeekDate() {
        return weekDate;
    }

    public void setWeekDate(Date weekDate) {
        this.weekDate = weekDate;
    }

    public BigDecimal getOpen() {
        return open;
    }

    public void setOpen(BigDecimal open) {
        this.open = open;
    }

    public BigDecimal getClose() {
        return close;
    }

    public void setClose(BigDecimal close) {
        this.close = close;
    }

    public BigDecimal getHigh() {
        return high;
    }

    public void setHigh(BigDecimal high) {
        this.high = high;
    }

    public BigDecimal getLow() {
        return low;
    }

    public void setLow(BigDecimal low) {
        this.low = low;
    }

    public Long getVolume() {
        return volume;
    }

    public void setVolume(Long volume) {
        this.volume = volume;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getChangePercent() {
        return changePercent;
    }

    public void setChangePercent(BigDecimal changePercent) {
        this.changePercent = changePercent;
    }

    public BigDecimal getChangeAmount() {
        return changeAmount;
    }

    public void setChangeAmount(BigDecimal changeAmount) {
        this.changeAmount = changeAmount;
    }

    public String getDataSource() {
        return dataSource;
    }

    public void setDataSource(String dataSource) {
        this.dataSource = dataSource;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "ETFWeekly{" +
                "id=" + id +
                ", code='" + code + "'" +
                ", market=" + market +
                ", name='" + name + "'" +
                ", weekDate=" + weekDate +
                ", open=" + open +
                ", close=" + close +
                ", high=" + high +
                ", low=" + low +
                ", volume=" + volume +
                ", amount=" + amount +
                ", changePercent=" + changePercent +
                ", changeAmount=" + changeAmount +
                ", dataSource='" + dataSource + "'" +
                ", updateTime=" + updateTime +
                "}";
    }
}